package com.ciwong.epaper.util;

import com.android.volley.Response;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by dylan on 2017/1/3.
 */
public class HttpRequest extends com.ciwong.libs.utils.volley.HttpRequest {


    public HttpRequest(String url, Response.ErrorListener errorListener, ResponseCallback callback) {
        super(url, errorListener, callback);
    }

    public HttpRequest(int method, String url, Response.ErrorListener errorListener, ResponseCallback callback) {
        super(method, url, errorListener, callback);
    }

    public HttpRequest(Map<String, String> params, Response.ErrorListener errorListener, ResponseCallback callback) {
        this(true, params, errorListener, callback);
    }

    public HttpRequest(boolean isVerifyAction, Map<String, String> params, Response.ErrorListener errorListener, ResponseCallback callback) {
        super(isVerifyAction, params, errorListener, callback);
    }

    public HttpRequest(int method, Map<String, String> params, Response.ErrorListener errorListener, ResponseCallback callback) {
        this(true, method, params, errorListener, callback);
    }

    public HttpRequest(boolean isVerifyAction, int method, Map<String, String> params, Response.ErrorListener errorListener, ResponseCallback callback) {
        super(isVerifyAction, method, params, errorListener, callback);
    }

    //
//
//    @Override
//    public String getBodyContentType() {
//        //解决v5 post 请求问题
//        return "application/json" ;
//
//    }
    public static Map<String, String> getBaseParam() {
        Map<String, String> map = new HashMap<>();
        map.put("clientId", EConstants.CLIENT_ID);
        VerifyInfo verifyInfo = HttpRequest.getVerifyInfo();
        map.put("accessToken", verifyInfo.getAccessToken());
        return map;
    }

}